/*
 +----------------------------------------------------------------------
 + Title        : common
 + Author       : huwl
 + Version      : 1.0.0
 + Initial-Time : 2024-12-31
 + Last-time    : 这个文件最后修改的时间 + 修改人的名称
 + Desc         : 公共接口
 +----------------------------------------------------------------------
*/

import type { RegionTree, ReverseParseAddr } from '@/types/common'
import {http} from '@/utils/httpRequest'

/**
 * 地区列表,请求方式[GET]
 * 
 * @param any data ---------------------------------------------请求参数
 * @returns RegionTree[]
 * @author huwl
 */
export const reqRegionTreeAPI = (data: any) => {
    return http<RegionTree[]>({
        method: 'GET',
        url: 'region/tree',
        data
    })
}

/**
 * 腾讯地图，逆地址解析,请求方式[GET]
 * 
 * @param any data ---------------------------------------------请求参数
 * @returns ReverseParseAddr
 * @author huwl
 */
export const reqTencentReverseParseAddressAPI = (data: any) => {
    return http<ReverseParseAddr>({
        method: 'GET',
        url: 'common/tencentReverseParseAddress',
        data
    })
}